package org.cancer.hadesdata.resource;

import org.cancer.hadesdata.controller.FileController;
import org.cancer.hadesdata.model.FileType;
import org.springframework.hateoas.mvc.ResourceAssemblerSupport;

public class FileTypeResourceAssembler extends ResourceAssemblerSupport<FileType,FileTypeResource> {

	public FileTypeResourceAssembler() {
		super(FileController.class, FileTypeResource.class);
	}

	@Override
	public FileTypeResource toResource(FileType source) {
		return createResourceWithId(source.getId(),source);
	}

	@Override
    protected FileTypeResource instantiateResource(FileType source) {
		return new FileTypeResource(source);
    }

}
